package exercises.innerclasses;

/**
 * @author: liuchong
 * @create: 2023/3/28 15:50
 * @description:
 */
public class Ex7outer {
    private int outI = 1;
    private void outHi() {System.out.println(outI);}
    class Inner {
        private int innerI = 11;
        void modifyOuter() {
            outI += 1;
            outHi();
        }
    }

    void testInner() {
        Inner inner = new Inner();
        inner.modifyOuter();
        System.out.println(inner.innerI);
    }
    public static void main(String[] args) {
        Ex7outer ex7outer = new Ex7outer();
        ex7outer.testInner();
    }
}
